#include "vap_utils.h"


void thread_function1()
{
    int cnt=1;
    while(1)
    {
        VAP_LOG_INFO("[%d] %s",cnt,"This is thread_function1 message");
        cnt++;
        usleep(100);
    }
}
void thread_function2()
{
    int cnt=1;
    while(1)
    {
        VAP_LOG_DEBUG("[%d] %s",cnt,"This is thread_function2 message");
        cnt++;
        usleep(300);
    }
}
void thread_function3()
{
    int cnt=1;
    while(1)
    {
        VAP_LOG_ERROR("[%d] %s",cnt,"This is thread_function3 message");
        cnt++;
        usleep(200);
    }
}

int main()
{
    std::cout<<"This is vap_log_test"<<std::endl;
    VAP_LOG_SET_LOGFILE_PATH("/home/zhc/vap/log/");
    VAP_LOG_SET_LOGFILE_NAME("vap_log_test");
    VAP_LOG_INIT();
    // VAP_LOG_INFO("[%d] %s \n",1,"This is thread_function3 message");
    // VAP_LOG_INFO("[%d] %s \n",2,"This is thread_function3 message");
    // VAP_LOG_INFO("[%d] %s \n",3,"This is thread_function3 message");
    // VAP_LOG_INFO("[%d] %s \n",4,"This is thread_function3 message");

    // auto t1 = std::thread(thread_function1);
    // auto t2 = std::thread(thread_function2);
    // auto t3 = std::thread(thread_function3);

    // t1.join();
    // t2.join();
    // t3.join();


}